<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>高度塌陷问题</title>
    <style>
        .box1 {
            border: 10px solid red;
        }
        
        .box3 {
            float: left;
            width: 300px;
            height: 300px;
            background-color: #bfa;
        }

        .clear {
            clear: both;
        }
    </style>
</head>
<body>
<!--todo -->
    <div class="box1">
        <div class="box3"></div>
        <div class="clear"></div>
    </div>
</body>
</html>